<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML>
<html>
<head>
<title>黑马程序员后台在线登记报名</title>
<link href="${pageContext.request.contextPath}/css/css.css"
	rel="stylesheet" type="text/css" />
<style type="text/css">
.prompt {
	color: #999;
	border: 1px solid #CCC;
	width: 250px;
	padding-left: 2px;
}

span {
	color: #999;
	margin-left: 10px;
}
</style>
<script type="text/javascript">
	function clearPrompt(input) {
		var value = input.value;
		if (value == '报名黑马的重要依据，请务必认真填写') {
			input.value = '';
			input.style.color = '#000';
		}
	}

	function checkName() {
		var span = document.getElementById("a1");
		var value = trim(document.regForm.name.value);
		if (value == '') {
			document.regForm.name.value = '报名黑马的重要依据，请务必认真填写';
			document.regForm.name.style.color = '#999';
			return false;
		}
		if (!value.match(/^[\u4e00-\u9fa5]{2,4}$/)) {
			span.innerHTML = "姓名不能为空，并且必须是中文";
			return false;
		} else {
			span.innerHTML = "";
			return true;
		}
	}

	function checkCellphone() {
		var span = document.getElementById("a2");
		var value = trim(document.regForm.cellphone.value);
		if (value == '') {
			document.regForm.cellphone.value = '报名黑马的重要依据，请务必认真填写';
			document.regForm.cellphone.style.color = '#999';
			return false;
		}
		if (!value.match(/^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/)) {
			span.innerHTML = "手机号格式不对";
			return false;
		} else {
			span.innerHTML = "";
			return true;
		}
	}

	function checkGender() {
		var genders = document.regForm.gender;
		var checked = false;
		for ( var i = 0; i < genders.length; i++) {
			if (genders[i].checked) {
				checked = true;
			}
		}
		var span = document.getElementById("a3");
		if (checked) {
			span.innerHTML = "";
			return true;
		} else {
			span.innerHTML = "请输入性别";
			return false;
		}
	}

	function checkQQ() {
		var value = trim(document.regForm.qq.value);
		var span = document.getElementById("a4");
		if (value == "") {
			span.innerHTML = "请输入QQ号码";
		} else if (!value.match(/^[1-9]\d{4,10}$/)) {
			span.innerHTML = "QQ号码格式不对";
		} else {
			span.innerHTML = "";
			return true;
		}
		return false;
	}

	function checkEmail() {
		var value = trim(document.regForm.email.value);
		var span = document.getElementById("a5");
		if (value == "") {
			span.innerHTML = "请输入邮箱";
		} else if (!value.match(/^([A-Za-z0-9_]|\.)+@\w+(\.\w+)+$/)) {
			span.innerHTML = "邮箱格式不对";
		} else {
			span.innerHTML = "";
			return true;
		}
		return false;
	}

	function checkAddress() {
		var value = trim(document.regForm.address.value);
		var span = document.getElementById("a6");
		if (value == "") {
			span.innerHTML = "请输入地址";
			return false;
		} else {
			span.innerHTML = "";
			return true;
		}
	}

	function checkCustomerEdu() {
		var value = trim(document.regForm.customerEdu.value);
		var span = document.getElementById("a7");
		if (value == "") {
			span.innerHTML = "请选择教育状况";
			return false;
		} else {
			span.innerHTML = "";
			return true;
		}
	}

	function checkCourse() {
		var value = trim(document.regForm.courseId.value);
		var span = document.getElementById("a8");
		if (value == "") {
			span.innerHTML = "请选择一门意向课程";
			return false;
		} else {
			span.innerHTML = "";
			return true;
		}
	}

	var iscommiteed = false;
	function doSubmit() {
		var b1 = checkName();
		var b2 = checkCellphone();
		var b3 = checkGender();
		var b4 = checkQQ();
		var b5 = checkEmail();
		var b6 = checkAddress();
		var b7 = checkCustomerEdu();
		var b8 = checkCourse();
		if (b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8) {
			if (iscommiteed) {
				alert("您已提交");
				return false;
			}
			iscommiteed = true;
			return true;
		} else {
			return false;
		}
	}
</script>
</head>

<body>
	<div
		style="background: #CCC;height:1135px;width:980px;margin:0px auto;">
		<div id="head">
			<img src="${pageContext.request.contextPath}/images/c_reg/banner.jpg"
				width="960" height="293" />
		</div>
		<div id="main">
			<div class="lf_info"
				style="font-family: Verdana,Tahoma,'Microsoft Yahei','Simsun';">
				<form name="regForm"
					action="${pageContext.request.contextPath}/customer/doReg.do"
					method="post" onsubmit="">
					<input type="hidden" name="token"
						value="7ec712f4-c01b-4a9d-834a-69633a460083">
					<table style="margin-left:10px;">
						<caption>
							<br />
							<br />
							<div
								style="font-size: 20px;text-align: left;font-weight: bold;padding-left:25px;">
								黑马程序员在线报名页面<span
									style="font-size:12px;color: black;font-weight: normal;">(以下信息是您报名黑马的重要依据，请认真填写)</span>
							</div>
							<br />
						</caption>

						<tr>
							<td class="lable">姓名<font color="red">*</font>
							</td>
							<td><input class="prompt" type="text" name="name"
								value="报名黑马的重要依据，请务必认真填写" onfocus="clearPrompt(this)"
								onblur="checkName()" size="25"> <span id="a1"></span></td>
						</tr>
						<tr>
							<td class="lable">手机<font color="red">*</font>
							</td>
							<td><input class="prompt" type="text" name="cellphone"
								value="报名黑马的重要依据，请务必认真填写" onfocus="clearPrompt(this)"
								onblur="checkCellphone()" size="25"> <span id="a2"></span>
							</td>
						</tr>

						<tr>
							<td class="lable">性别<font color="red">*</font>
							</td>
							<td><input type="radio" name="gender"
								style="vertical-align:middle;" value="男" onblur="checkGender()">男
								<input type="radio" name="gender" style="vertical-align:middle;"
								value="女" onblur="checkGender()">女 <span id="a3"></span>
							</td>
						</tr>

						<tr>
							<td class="lable">QQ<font color="red">*</font>
							</td>
							<td><input type="text" name="qq" value="" onblur="checkQQ()" />
								<span id="a4"></span></td>
						</tr>
						<tr>
							<td class="lable">邮箱<font color="red">*</font>
							</td>
							<td><input type="text" name="email" value=""
								onblur="checkEmail()" /> <span id="a5"></span></td>
						</tr>
						<tr>
							<td class="lable">地址<font color="red">*</font>
							</td>
							<td><input type="text" name="address" style="width:250px"
								value="" onblur="checkAddress()"> <span id="a6"></span>
							</td>
						</tr>

						<tr>
							<td class="lable">状况<font color="red">*</font>
							</td>
							<td><select class="input" name="customerStatus"
								onblur="checkCustomerEdu()">
									<option value=""></option>
									<option value="在职">在职</option>
									<option value="待业">待业</option>
									<option value="在读研究生">在读研究生</option>
									<option value="大四">大四</option>
									<option value="大三">大三</option>
									<option value="大二">大二</option>
									<option value="大一">大一</option>
							</select> <span id="a7"></span></td>
						</tr>


						<tr>
							<td class="lable">意向课程<font color="red">*</font>
							</td>
							<td><select class="input" name="intentionCourse" id="course"
								onblur="checkCourse()">
									<option value=""></option>
									<option value="JavaEE+Android课程">JavaEE+Android课程</option>
									<option value="Net+WindowPhone课程">Net+WindowPhone课程</option>
									<option value="JavaEE+物联云计算课程">JavaEE+物联云计算课程</option>
							</select> <span id="a8"></span></td>
						</tr>

						<tr style="line-height: 40px">
							<td class="lable">了解黑马渠道</td>
							<td><input type="radio" name="infoSource" value="CSDN网站">CSDN网站&nbsp;
								<input type="radio" name="infoSource" value="黑马老学员">黑马老学员&nbsp;
								<input type="radio" name="infoSource" value="朋友推荐">朋友推荐&nbsp;
								<input type="radio" name="infoSource" value="Baidu">Baidu&nbsp;
								<input type="radio" name="infoSource" value="视频教程">视频教程&nbsp;
								<input type="radio" name="infoSource" value="其它">其它&nbsp;
							</td>
						</tr>

						<tr>
							<td class="lable">留言</td>
							<td><textarea rows="12" cols="70" name="message"
									style="font-size:12px">请简述您有没有Java基础或.Net基础，以及为什么想成为程序员？</textarea>
							</td>
						</tr>

						<tr>
							<td></td>
							<td><input type="submit" value=" 提 交 "></td>
						</tr>
					</table>
				</form>
			</div>
			<div class="rt_info">
				<ul>
					<li class="style_bd">
						<h2>中关村黑马训练营</h2>
						<p>
							由CSDN和中关村软件园共同推出的培训项目：采用"先培训、后交费"的付款方式；入学需要经过严格测试，合格后方可入学学习；以JavaEE+3G和.Net+WP7+Windows
							8为讲学体系；由传智播客知名讲师团队进行授课。<br /> 咨询电话：010-82826816/82826576<br />
							咨询&nbsp;&nbsp;QQ：4006810006
						</p></li>
					<li style="margin-top:10px;"><img
						src="${pageContext.request.contextPath}/images/c_reg/an01.jpg"
						width="260" height="233" border="0" usemap="#Map" />
					<map name="Map" id="Map">
							<area shape="rect" coords="5,17,255,72"
								href="../oa.itheima.com/default.htm" target="_blank" />
							<area shape="rect" coords="6,85,255,141"
								href="../edu.csdn.net/java/flow.shtml" target="_blank" />
							<area shape="rect" coords="7,155,254,209"
								href="../edu.csdn.net/dotnet/flow.shtml" target="_blank" />
						</map></li>
				</ul>
			</div>
		</div>
	</div>
	<div align="left" style="clear: both;">
		<script src="../edu.csdn.net/heima/js/floatadv.js"
			type="text/javascript"></script>
		<script type="text/javascript">
			if (true) {
				theFloaters.addItem('AD', 24, 0, '<div style="position: absolute; left: -22px; top: 160px;"><a target="_blank" href="../oa.itheima.com/reg.jsp"><img src="../edu.csdn.net/images/y11.gif" height="145" width="113" alt="黑马程序员训练营Java培训，Android培训，3G培训，不花1分钱即可入学！不3k就业不给1分学费！不做软件开发不给学费！绝无任何利息！电话咨询请拨：010-82826816/82826576" border="0"></a></div>');
			}
			theFloaters.play();
		</script>
	</div>
	<!-- //fll -->
	<div class="footer">
		联系电话：010-82826816 传真:010-82826576 E-mail:heima@csdn.net<br>
		地址：北京市海淀区东北旺西路8号中关村软件园9号楼2区副厅3层&nbsp;&nbsp;邮编:100193&nbsp;&nbsp;<a
			href="../edu.csdn.net/heima/about.html" style="color: #0066FF;"
			target="_blank">关于我们</a><br>
		版权所有：北京传智播客教育科技有限公司--专业JavaEE+Android培训机构 © 2006-2011
		<script type="text/javascript">
			var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
			document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F72cf317213bb87212932191eb317d08c' type='text/javascript'%3E%3C/script%3E"));
		</script>
		<script
			src="../s84.cnzz.com/stat.php@id=4617801&web_id=4617801&show=pic"
			language="JavaScript"></script>

	</div>
	<script type="text/javascript">
		kfguin = "4006810006";
		eid = "218808P8z8p8y8P8R8x8q";
		ws = "www.itheima.com";
		type = "0";
		wpadomain = "b";
	</script>
	<script type="text/javascript"
		src="../im.bizapp.qq.com_3A8000/kf.js@t=110922"></script>
</body>
</html>


